#ifndef __DBSQLITE_H__
#define __DBSQLITE_H__

#include "ddm.h"

struct sqlite3;
struct sqlite3_stmt;
namespace DDM
{
class DBSqlite :
	public Database
{
public:
	DBSqlite(void);
	~DBSqlite(void);

    int connect(const char *host, const char *user, const char *passwd, const char *db=NULL);
    void close();

    int execute(const char* sql);
	int real_execute(const char* sql, vector<DBCol*> *cols);
    int execute_with_result(const char* sql, std::vector<DBRow*> *records);
    int get_rows(vector<DBRow*> *prows);

    const char* db_error() const;
private:
    sqlite3 *db;
	
};
}

#endif
